<?php

/*
*###########################################################################################################################*
#															    															#
#															    															#
#    **  ** ****** ** **  **  ****** ** ***   ** ***   ****** ** **  **  ** **  ** ** **  **    ****   ** **  **  ******    #
#    **  ** ****** ********** ****** *******  *******  ****** ********** ** **  ** **********  ******  ********** ******    #
#    **  ** **  ** **  **  ** **     ***   ** **    ** **     **  **  **    **  ** **  **  ** ***   ** **  **  ** **        #
#    ****** **  ** **  **  ** ****** **   *** **   *** ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    ****** **  ** **  **  ** ****** *******  *******  ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    **  ** **  ** **  **  ** **     *****    ******   **     **  **  ** ** **  ** **  **  ** ***   ** **  **  **     **    #
#    **  ** ****** **  **  ** ****** **       **  ***  ****** **  **  ** ** ****** **  **  **  ******  **  **  ** ******    #
#    **  ** ****** **  **  ** ****** **       **   *** ****** **  **  ** **  ** ** **  **  **   ****   **  **  ** ******    #
#															    															#
#															    															#
#															    															#
#    2010 - 2011 © HomePremiumCMS made by HomePemium as PremiumEye & Security by HomePremium and Merijnz		    		#
#															    															#
#    Powered by PhoenixPHP 3.7.1 (build 138000)										    									#
#															    															#
#															    															#
#															    															#
*###########################################################################################################################*
*/

define('USERNAME_REQUIRED', FALSE);
define('ACCOUNT_REQUIRED', FALSE);
include('../global.php');

if($core->EscapeString($users->UserPermission('cmd_closed_login', $core->EscapeString($_SESSION['username'])))) {
}else{
if($core->EscapeString($core->CmsSetting('hotel_open')) == 'closed')
header("Location: ".WWW."/me.php");
}
?>
<?php
$webbuild = $core->EscapeString($core->SetWebBuild());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<?php
$rand1 = rand(100000, 999999);
$rand2 = rand(10000, 99999);
$rand3 = rand(10000, 99999);
$rand4 = rand(10000, 99999);
$rand5 = rand(10000, 99999);
$rand6 = rand(1, 9);
$ticket = "ST-".$rand1."-".$rand2.$rand3."-".$rand4.$rand5."-otaku-".$rand6;
$username = $core->EscapeString($_SESSION['username']);
if(@$_GET['ticket'] && @$_GET['username'] && $core->EscapeString($users->UserPermission('hk_ext_login', $_SESSION['username'])))
{
	$username = $_GET['username'];
	$ticket = $_GET['ticket'];
}
$query = mysql_query("UPDATE users SET auth_ticket = '$ticket' WHERE username = '$username'");
$query = mysql_query("UPDATE users SET ip_last = '".$_SERVER['REMOTE_ADDR']."' WHERE username = '$username'");
?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"> 
<head> 
	<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
	<title><?php echo $sitename." - Client"; ?></title>

<link rel="shortcut icon" href="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/v2/favicon.ico" type="image/vnd.microsoft.icon" /> 
<link rel="alternate" type="application/rss+xml" title="Habbo Hotel: RSS" href="http://www.habbo.nl/articles/rss.xml" /> 
<meta name="csrf-token" content="67227055e0"/> 
<link rel="stylesheet" href="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/styles/common.css" type="text/css" />

<script src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/js/libs2.js" type="text/javascript"></script>
<script src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/js/visual.js" type="text/javascript"></script>
<script src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/js/libs.js" type="text/javascript"></script>
<script src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/js/common.js" type="text/javascript"></script>
<script src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/js/landing.js" type="text/javascript"></script>

<script>var isNS = (navigator.appName == "Netscape") ? 1 : 0; if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP); function mischandler(){ return false; } function mousehandler(e){ var myevent = (isNS) ? e : event; var eventbutton = (isNS) ? myevent.which : myevent.button; if((eventbutton==2)||(eventbutton==3)) return false; } document.oncontextmenu = mischandler; document.onmousedown = mousehandler; document.onmouseup = mousehandler;
</script>
 
<script type="text/javascript">

var ad_keywords = "";

var ad_key_value = "";

</script>

<script type="text/javascript"> 
document.habboLoggedIn = true;
var habboName = "<?php echo $core->EscapeString($_SESSION['username']); ?>";
var facebookUser = false;
var habboReqPath = "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>";
var habboStaticFilePath = "http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery";
var habboImagerUrl = "http://www.habbo.nl/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>/client";
window.name = "ClientWndw";
if (typeof HabboClient != "undefined") {
    HabboClient.windowName = "ClientWndw";
    HabboClient.maximizeWindow = true;
}
 
 
</script> 
 
<noscript> 
    <meta http-equiv="refresh" content="0;url=/client/nojs" />
</noscript> 
 
 
 
<link rel="stylesheet" href="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/styles/habboflashclient.css" type="text/css" />
<script src="Loader/Loader.js" type="text/javascript"></script>
<script src="Loader/habboflashclient.js" type="text/javascript"></script>

<script type="text/javascript"> 
    FlashExternalInterface.loginLogEnabled = false;
    
    FlashExternalInterface.logLoginStep("web.view.start");
    
    if (top == self) {
        FlashHabboClient.cacheCheck();
    }
    var flashvars = {
            "client.allow.cross.domain" : "1", 
            "client.notify.cross.domain" : "1", 
            "connection.info.host" : "<?php echo $core->EscapeString($core->CmsSetting('client_ip')); ?>", 
            "connection.info.port" : "<?php echo $core->EscapeString($core->CmsSetting('client_port')); ?>", 
            "site.url" : "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>", 
            "url.prefix" : "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>", 
            "client.reload.url" : "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>/client", 
            "client.fatal.error.url" : "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>/client/disconnected.php", 
            "client.connection.failed.url" : "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>/client/disconnected.php", 
            "external.variables.txt" : "<?php echo $core->EscapeString($core->CmsSetting('client_variables')); ?>", 
            "external.texts.txt" : "<?php echo $core->EscapeString($core->CmsSetting('client_texts')); ?>",
            "use.sso.ticket" : "1", 
            "sso.ticket" : "<?php echo $ticket ?>", 
            "processlog.enabled" : "0", 
            "account_id" : "1", 
            "client.starting" : "Onze piccolo sleept je koffers naar Zengo!", 
            "flash.client.url" : "<?php echo $core->EscapeString($core->CmsSetting('client_swf_path')); ?>/", 
            "user.hash" : "31385693ae558a03d28fc720be6b41cb1ccfec02", 
            "has.identity" : "0", 
            "flash.client.origin" : "popup",
			"token" : "<?php echo $ticket ?>"
    };
    var params = {
        "base" : "<?php echo $core->EscapeString($core->CmsSetting('client_swf_path')); ?>/",
        "allowScriptAccess" : "always",
        "menu" : "false",   
		"bgcolor" : "#000",
		"wmode" : "transparent"             
    };
 
        params["wmode"] = "opaque";
 
    FlashExternalInterface.signoutUrl = "<?php echo $core->EscapeString($core->CmsSetting('cms_url')); ?>/logout.php";
 
    var clientUrl = "<?php echo $core->EscapeString($core->CmsSetting('client_habbo_swf')); ?>";
    swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "10.0.0", "http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/flash/expressInstall.swf", flashvars, params, null, FlashExternalInterface.embedSwfCallback);
 
    window.onbeforeunload = unloading;
    function unloading() {
        var clientObject;
        if (navigator.appName.indexOf("Microsoft") != -1) {
            clientObject = window["flash-container"];
        } else {
            clientObject = document["flash-container"];
        }
        try {
            clientObject.unloading();
        } catch (e) {}
    }
    window.onresize = function() {
        HabboClient.storeWindowSize();
    }.debounce(0.5);
</script> 
 
 
 
<!--[if IE 8]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/styles/ie8.css" type="text/css" />
<![endif]--> 
<!--[if lt IE 8]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/styles/ie.css" type="text/css" />
<![endif]--> 
<!--[if lt IE 7]>
<link rel="stylesheet" href="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/styles/ie6.css" type="text/css" />
<script src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/static/js/pngfix.js" type="text/javascript"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>
 
<style type="text/css">
body { behavior: url(/js/csshover.htc); }
</style>
<![endif]--> 
<meta name="build" content="63-BUILD695 - 31.08.2011 11:16 - nl" /> 
</head> 
<body id="client" class="flashclient"> 

<img src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/v2/images/page_loader.gif" style="position:absolute; margin: -1500px;" /> 
 
<link rel="stylesheet" type="text/css" href="../Public/Styles/Default/CSS/main.css">

<div id="overlay"></div>

<div id="client-ui" style=""> 

    <div id="flash-wrapper"> 
    <div id="flash-container"> 
        <div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none"> 
<div class="cbb clearfix"> 
    <h2 class="title">Installeer alsjeblieft de meest recente versie van de Adobe Flash Player</h2> 
    <div class="box-content"> 
            <p>Je hebt de Adobe Flash Player nodig om de Beta te testen. Je kan deze vanaf de volgende link downloaden en installeren: <br><br> 
 
<a target ="blank"href="http://get.adobe.com/flashplayer/">Installeer Adobe Flash Player</a>.<br><br> 
 
Klik op 'Agree and install now' om de installatie te starten. Op deze <a target="blank" href="http://www.adobe.com/products/flashplayer/productinfo/instructions/">pagina</a> vind je een Engelse instructie voor bij de installatie.</p> 
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://images.habbo.com/habboweb/<?php echo $webbuild; ?>/web-gallery/v2/images/client/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> 
    </div> 
</div> 
        </div> 
        <script type="text/javascript"> 
            $('content').show();
        </script> 
        <noscript> 
            <div style="width: 400px; margin: 20px auto 0 auto; text-align: center">
                <p>If you are not automatically redirected, please <a href="/client/nojs">click here</a></p>
            </div>
        </noscript> 
    </div> 
    </div> 
	<!--div id="content" class="client-content"></div-->     
        <script type="text/javascript">
        RightClick.init("flash-wrapper", "flash-container");
        if (window.opener && window.opener != window && window.opener.location.href == "/") {
            window.opener.location.replace("/me");
        }
        $(document.body).addClassName("js");
       	HabboClient.startPingListener();
        Pinger.start(true);
        HabboClient.resizeToFitScreenIfNeeded();
    </script>
<div id="fb-root"></div>

<script type="text/javascript">

    window.fbAsyncInit = function() {

        Cookie.erase("fbsr_183096284873");

        FB.init({appId: '183096284873', status: true, cookie: true, xfbml: true, oauth: true});

        $(document).fire("fbevents:scriptLoaded");



    };

    window.assistedLogin = function(FBobject, optresponse) {

        

        Cookie.erase("fbsr_183096284873");

        FB.init({appId: '183096284873', status: true, cookie: true, xfbml: true, oauth: true});



        permissions = 'user_birthday,email';

        defaultAction = function(response) {



            if (response.authResponse) {

                fbConnectUrl = "/facebook?connect=true";

                Cookie.erase("fbhb_val_183096284873");

                Cookie.set("fbhb_val_183096284873", response.authResponse.accessToken);

                Cookie.erase("fbhb_expr_183096284873");

                Cookie.set("fbhb_expr_183096284873", response.authResponse.expiresIn);

                window.location.replace(fbConnectUrl);

            }

        };



        if (typeof optresponse == 'undefined')

            FB.login(defaultAction, {scope:permissions});

        else

            FB.login(optresponse, {scope:permissions});



    };



    (function() {

        var e = document.createElement('script');

        e.async = true;

        e.src = 'https://connect.facebook.net/en_US/all.js';

        document.getElementById('fb-root').appendChild(e);

    }());

</script>




        <iframe name="logframe" src="/bc/logframe?" width="0" height="0" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" style="position: absolute; top:0; left:0"></iframe>


<iframe name="conversion-tracking" src="/conversion_tracking_frame" width="0" height="0" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" style="position: absolute; top:0; left:0"></iframe>

<script type="text/javascript">
    var ssa_json = {
            'applicationUserId': '45614356',
        'applicationKey': '2abb40ad',
        'onCampaignsReady': supersaverAdsOnCampaignsReady,
        'onCampaignOpen': supersaverAdsOnCampaignOpen,
        'onCampaignClose': supersaverAdsOnCampaignClose,
        'onCampaignCompleted': supersaverAdsOnCampaignCompleted,
        'pagination': false,
            'customCss': 'http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/957/web-gallery/styles/supersonicads.css'
    };

    function supersaverAdsLog(message) {
        if ("console" in window && "log" in console) {
            console.log(message);
        }
    }

    function supersaverAdsCamapaignEngage() {
        supersaverAdsLog("supersaverAdsCamapaignEngage");
        SSA_CORE.BrandConnect.engage();

        var topBar = document.getElementById("ssaInterstitialTopBar");
        var innerHTML = topBar.innerHTML;
        topBar.innerHTML = "";

        var topBarInnerContainerLeft = document.createElement("div");
        topBarInnerContainerLeft.className = "ssaInterstitialTopBarInnerContainerLeft";

        var topBarInnerContainerRight = document.createElement("div");
        topBarInnerContainerRight.className = "ssaInterstitialTopBarInnerContainerRight";

        var closeButton = document.createElement("div");
        closeButton.className = "ssaTopBarCloseButton";
        closeButton.setAttribute("onClick", "SSA_CORE.close('ssaBrandConnect')");
        closeButton.innerHTML = "";

        var textDiv = document.createElement("span");
        textDiv.className = "ssaTopBarTextSpan";
        textDiv.innerHTML = innerHTML;

        topBarInnerContainerLeft.appendChild(closeButton);
        topBarInnerContainerLeft.appendChild(textDiv);

        topBar.appendChild(topBarInnerContainerRight);
        topBar.appendChild(topBarInnerContainerLeft);

        var bottomBar = document.getElementById("ssaInterstitialBottomBar");
        var bottomInnerContainerLeft = document.createElement("div");
        bottomInnerContainerLeft.className = "ssaBottomBarInnerLeft";
        var bottomInnerContainerRight = document.createElement("div");
        bottomInnerContainerRight.className = "ssaBottomBarInnerRight";

        bottomBar.appendChild(bottomInnerContainerRight);
        bottomBar.appendChild(bottomInnerContainerLeft);
    }

    function supersaverAdsOnCampaignsReady(offers) {
        if (typeof offers !== 'undefined' && offers.length) {
            supersaverAdsLog("supersaverAdsOnCampaignsReady offers: " + offers.length);
            for (var i = 0; i < offers.length; i++) {
                supersaverAdsLog(offers[i]);
            }
            FlashExternalInterface.clientElement.supersaverAdsOnCampaignsReady(offers.length.toString());
        } else {
            supersaverAdsLog("supersaverAdsOnCampaignsReady no offers!");
			FlashExternalInterface.clientElement.supersaverAdsOnCampaignsReady("0");
        }
    }

    function supersaverAdsOnCampaignOpen(offer) {
        supersaverAdsLog("supersaverAdsOnCampaignOpen");
        supersaverAdsLog(offer);
        FlashExternalInterface.clientElement.supersaverAdsOnCampaignOpen();
    }

    function supersaverAdsOnCampaignClose(offer) {
        supersaverAdsLog("supersaverAdsOnCampaignClose");
        supersaverAdsLog(offer);
        FlashExternalInterface.clientElement.supersaverAdsOnCampaignClose();
    }

    function supersaverAdsOnCampaignCompleted(offer) {
        supersaverAdsLog("supersaverAdsOnCampaignCompleted");
        supersaverAdsLog(offer);
        FlashExternalInterface.clientElement.supersaverAdsOnCampaignCompleted();
    }

    function supersaverAdsLoadCampaigns() {
        // We need the client to have wmode=opaque or wmode=transparent for video offers
        if (HabbletLoader.needsFlashKbWorkaround()) {
            return;
        }
        supersaverAdsLog("loading supersaver script");
        var g = document.createElement('script');
        var s = document.getElementsByTagName('script')[0];
        g.async = true;
        g.src = '//jsd.supersonicads.com/inlineDelivery/delivery.compressed.gz.js';
        s.parentNode.insertBefore(g,s);
    }
</script>
       
</div> 

    <script type="text/javascript"> 
        RightClick.init("flash-wrapper", "flash-container");
        if (window.opener && window.opener != window && window.opener.location.href == "/") {
            window.opener.location.replace("/me");
        }
        $(document.body).addClassName("js");
       	HabboClient.startPingListener();
        Pinger.start(true);
        HabboClient.resizeToFitScreenIfNeeded();
    </script>  
 
        <script language="JavaScript" type="text/javascript"> 
            getFingerprint();
        </script> 
 
<script type="text/javascript"> 
    HabboView.run();
</script> 
<script type="text/javascript">
jjLoader.init('client', 6, '../Public/Styles/Default/Images/logo.gif', '../Public/Styles/Default/Images/backgrounds/home_hotel_vieuw.png');
</script>
 </body> 
</html>